#import "checkers.h"

#define CHECKERS_WIN 1000000

typedef struct CheckersAISettings {
	int time_limit, depth_limit;
	int nodes;
	int timeout;
	/*To weaken the AI subtly, random noise can be added to evaluations*/
	int random_noise;
	/*A less subtle way to weaken the AI is to randomly ignore branches of evaluation */
	int random_branch_cuts;
} CheckersAISettings;

/*Returns 'score' for current board and puts the best move into 'bestMove'
 *Requires setting of chbSetAITimeout.*/
int chbEvaluatePosition(CheckersBoard* board, CheckersAISettings* ai,
		CheckersMove* bestMove, int depth,
		int alpha, int beta, BOOL extendCaptures);

/*Returns 'score' for current board and puts the best move into 'bestMove'*/
int chbComputeAIResponse(CheckersBoard* board, CheckersAISettings* ai, CheckersMove* bestMove);

void chbInitAISettings(CheckersBoard* notused, CheckersAISettings* ai);
void chbSetAITimeout(CheckersAISettings* ai);
BOOL chbAITimedout(CheckersAISettings* ai);



